<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 组件：传递给组件中的值：props。 -->
        <wufan v-for="item in items" v-bind:wu ="item"></wufan>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
    <script>
        //定义一个Vue组件
        Vue.component("wufan",{
            props:['wu'],
            template:'<li>{{wu}}</li>'
        });
        var vm = new Vue({
            el:"#app",
            data:{
                items:["html","css","Vue"]
            }
        });
    </script>
</body>
</html>